package Test;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @Author: 吕庆龙
 * @Date: 2019/10/17 11:28
 * <p>
 * 功能描述:
 */
public class TestOther {
    public static void main(String[] args) {
        test001();
    }

    public static void test001(){
        String outTradeNo = "gmall";
        outTradeNo = outTradeNo + System.currentTimeMillis();// 将毫秒时间戳拼接到外部订单号
        System.out.println("毫秒时间\t" + outTradeNo);

        //D是一年的第几天,d是一月的第几天
        SimpleDateFormat sdf = new SimpleDateFormat("YYYY-MM-DD-HH-mm-ss");
        System.out.println("时间字符串\t" + sdf.format(new Date()));
    }

    static <T> List<T> arrayToList(final T[] array) {
        final List<T> l = new ArrayList<T>(array.length);

        for (final T s : array) {
            l.add(s);
        }
        return (l);
    }


    static <Integer> List<Integer> arrayToList1(final Integer[] array) {
        final List<Integer> l = new ArrayList<Integer>(array.length);

        for (final Integer s : array) {
            l.add(s);
        }
        return (l);
    }



}
